<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\daterange\DateRangePicker;
use common\models\member\MemberCash;

/* @var $this yii\web\View */
/* @var $model addons\HsShop\common\models\ShopOrder */
/* @var $form yii\widgets\ActiveForm */
$addon = <<< HTML
<span class="input-group-addon">
    <i class="glyphicon glyphicon-calendar"></i>
</span>
HTML;
?>

<div class="shop-order-form">

    <?php $form = ActiveForm::begin([
        'method'=>'get'
    ]);?>
        <div class="col-xs-12">
            
            <div class="col-xs-4">
                <?= $form->field($model, 'username')->textInput(['maxlength' => true])->label('会员编号') ?>
            </div>
            
        </div>
        <div class="col-sm-4 p-r-no-away">
                <div class="input-group drp-container" style ="padding-left: 15px;">
                    <?= DateRangePicker::widget([
                        'name' => 'queryDate',
                        'value' => $model->start_time . '-' . $model->end_time,
                        'readonly' => 'readonly',
                        'useWithAddon' => true,
                        'convertFormat' => true,
                        'startAttribute' =>'MemberCashSearch[start_time]',
                        'endAttribute' => 'MemberCashSearch[end_time]',
                        'startInputOptions' => ['value' => $model->start_time],
                        'endInputOptions' => ['value' => $model->end_time],
                        'pluginOptions' => [
                            'locale' => ['format' => 'Y-m-d'],
                        ]
                    ]) . $addon;?>
                </div>
            </div>

         <div class="form-group">
            &nbsp;&nbsp;&nbsp;<input  type="submit" class="btn btn-primary btn-sm" value="搜索"  style="margin-top: 3px;">
        </div>
    <?php ActiveForm::end(); ?>

</div>
